package com.jiyun.controller;

import com.jiyun.service.ReservationService;
import com.jiyun.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/reservation")

public class ReservationController {

    @Autowired
    ReservationService reservationService;

    @RequestMapping("/findreservation")
    public R findreservation(){
        return reservationService.findreservation();
    }

    @RequestMapping("/findreserById")
    public R findreserById(Integer id){
        return reservationService.findreserById(id);
    }

    @RequestMapping("/deleteReservation")
    public R deleteReservation(Integer id){
        return reservationService.deleteReservation(id);
    }
}
